package com.mall.userservice.controller;

import com.mall.userservice.StudentConfig;
import com.mall.userservice.feign.ProductConsumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @Autowired
    private StudentConfig studentConfig;

    @Autowired
    private ProductConsumer productConsumer;

    @GetMapping("/test")
    @ResponseBody
    public String test () {
        String name = studentConfig.getName();
        return " hello : " + name + " : product =" + productConsumer.test();
    }
}
